<!--{template header}-->

<style>
#code{
height: 30px;
margin-left: 10px;
}
</style>
<div class="container  mar-t-1 mar-b-1">
<div class="row">
  <div class="col-sm-24">

    <form  class="form-horizontal mar-t-05"  name="answerform"  action="{url answer/append}" method="post" onsubmit="return check_form();" >
            <div class="askbox">
               
                
                 <div class="form-group">
         
          <div style="padding:0px 10px;">
            <p class="col-md-24 form-title" style="margin-bottom: 8px;font-weight:900;">
           <!--{if $answer['authorid'] == $user['uid']}-->继续回答
  <!--{else}-->继续追问
  <!--{/if}-->
          </p>
          <hr class="clear">
          </div>
          <div class="col-md-16">
            <div id="introContent">
                        <!--{template editor}-->
                    </div>
          </div>
        </div>
            <div class="form-group" style="margin-bottom:8px;">
                <!--{if $user['grouptype']!=1&&$setting['code_ask']&&$user['credit1']<$setting['jingyan']}-->
        
                      
     <!--{template code}-->
       
          <!--{/if}-->
            </div>
              
          
         <div class="form-group" style="clear:both;">
         <div class="ui-btn-wrap">
           <input type="hidden" value="{$qid}" name="qid"/>
                    <input type="hidden" value="{$aid}" name="aid"/>
             <button type="submit" id="postme" name="postme" class="ui-btn ui-btn-primary" data-loading="稍候...">保存</button>
          <a class="ui-btn" style="margin-left:8px;" onclick="window.history.go(-1)">返回</a>
          </div>
        </div>
            </div>	
        </form>
  </div>
  

</div>
</div>

<script type="text/javascript">
    function check_form() {
    	  $("#postme").attr("disabled",true);
    	  
    	   <!--{if $user['grouptype']!=1&&$setting['code_ask']&&$user['credit1']<$setting['jingyan']}-->
    	   var _flagcode=check_code();
  	     if(_flagcode==0){
  	    	$("#postme").attr("disabled",false);
  	    	$("#postme").removeAttr("disabled");
  	         updatecode();
  	         return false;
  	     }
    	   <!--{/if}-->
   	 var eidtor_content='';
   	eidtor_content = editor.wang_txt.html();
   	eidtor_content=$.trim(eidtor_content.replace('<p><br></p>',''));
console.log(eidtor_content.length);
        if (eidtor_content=='') {
        	 $("#postme").attr("disabled",false);
        	 $("#postme").removeAttr("disabled");
            alert('内容不能为空！');
            return false;
        }
        document.answerform.submit();
        return true;
    }
</script>
<!--{template footer}-->